package com.vancouver.knows.ui.activity.search;

import android.content.Context;
import android.view.View;

import com.pangu.task.mark.ATaskMark;
import com.pangu.ui.refresh.ARefreshViewController;
import com.pangu.ui.refresh.RefreshControllerView;
import com.vancouver.knows.business.BusinessModule;
import com.vancouver.knows.MainApplication;

/**
 * 搜索全部内容查看页面
 * 
 * @author llf
 * 
 */
public class SearchResultPullRefreshView extends RefreshControllerView {

	public SearchResultPullRefreshView(Context context) {
		super(context);
	}

	@SuppressWarnings("rawtypes")
	@Override
	public void onRefresh(ARefreshViewController controller) {
		((SearchResultListView) content).handleRefreshLoadItem();
	}

	public void loadData(String keyWord, String type) {
		BusinessModule module = ((MainApplication) imContext).getBusinessModule();
		ATaskMark aTaskMark = module.getTaskMarkPool().createSearchResultTaskMark();
		((SearchResultListView) content).initLoadableView(keyWord, type, aTaskMark);
	}

	@Override
	protected View createContentView() {
		return new SearchResultListView(getContext(), this);
	}

}
